#include "vld.h"
#include "engine.h"

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,char* lpCmdLine,int nShowCmd)
{
	MSG msg;

	game.init();
	input.update();
	while(!game.need_exit)
	{
		game.update();
		game.draw();
		input.update();
		if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
		{
			if(msg.message==WM_QUIT)
				break;
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}
	return 0;
}